tb_pathToImage = "images/loadingAnimation.gif";
$(document).ready(function(){

  //  --  ALL TABLES  --  //
  $("table tr td").css("text-align","right");
  $("table tr").each(function(){
    var cells = $("td", this);
    cells.eq(0).css("text-align","left");
  });

  //  --  TOTAL TABLE  --  //
  $("#totalTable table tr").eq(1).css("font-weight","bold").css("font-size","1.1em");

  //  --  FILE TABLE  --  //
  $("#fileTable table tr").each(function(){
    var cells = $("td",this);
    if(!cells.size())
      return;

    var cellLines	= cells.eq(2);
    var cellCode	= cells.eq(3);  
    var cellDoc		= cells.eq(4);  

    var intCode	= parseInt(cellCode.html());
    var intDocs	= parseInt(cellDoc.html());

    var floatCode	= parseInt(cellCode.html())/100;  
    var floatLines	= parseInt(cellLines.html())/100;  

    var color = floatLines*floatCode > 1 ? 'red' : 'green';
    cellLines.css('color',color);

    if( intCode < 30 )
      cellCode.css('color','green').css('font-weight','bold');
    if( intCode > 70 )
      cellCode.css('color','red').css('font-weight','bold');

    if( intDocs < 10 )
      cellDoc.css('color','red').css('font-weight','bold');
    if( intDocs > 30 )
      cellDoc.css('color','green').css('font-weight','bold');


    cells.eq(5).css('color','gray');

  })
});
